package com.guomao.entity;

import com.guomao.functions.Collidable;
import com.guomao.functions.Hitable;
import com.guomao.functions.Recyclable;
import com.guomao.utils.DrawUtils;

import java.io.IOException;

public class SteelWall extends Element implements Collidable, Hitable, Recyclable {

    public SteelWall() {

    }

    public SteelWall(int x, int y) {
        this.x = x;
        this.y = y;
        super.path = "day15-javase-tank\\images\\steel.gif";
        super.hp = 6;
        this.getSize();
    }

    @Override
    public Blast showBlast() {
        hp--;
        return new Blast(x, y, width, height);
    }

    @Override
    public boolean isOutside() {
        return hp <= 0;
    }
}
